home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / esdfeduc / cusorder.fr_ / cusorder.fr (.txt)
Encoding:
Visual Basic Form  |  1997-12-14  |  16.3 KB  |  483 lines

  1. VERSION 5.00
  2. Object = "{EB554505-3E59-11D1-9EE4-444553540000}#3.0#0"; "ESDF.OCX"
  3. Begin VB.Form frmCustomerOrders 
  4.    Caption         =   "Orders of Customer"
  5.    ClientHeight    =   6555
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   7845
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   6555
  11.    ScaleWidth      =   7845
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin ESDF.ColumnNoEdit ColumnNoEdit1 
  14.       Height          =   315
  15.       Index           =   0
  16.       Left            =   180
  17.       TabIndex        =   11
  18.       Top             =   6240
  19.       Width           =   2175
  20.       _ExtentX        =   3836
  21.       _ExtentY        =   556
  22.       DataTable       =   "Table3"
  23.       Browsed         =   -1  'True
  24.       DataField       =   "ProductName"
  25.       BrowseColWidth  =   20
  26.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  27.          Name            =   "Courier New"
  28.          Size            =   9.75
  29.          Charset         =   0
  30.          Weight          =   400
  31.          Underline       =   0   'False
  32.          Italic          =   0   'False
  33.          Strikethrough   =   0   'False
  34.       EndProperty
  35.    End
  36.    Begin ESDF.ColumnNoEdit cneOrderID 
  37.       Height          =   315
  38.       Left            =   180
  39.       TabIndex        =   7
  40.       Top             =   3660
  41.       Width           =   1035
  42.       _ExtentX        =   1826
  43.       _ExtentY        =   556
  44.       DataTable       =   "Table2"
  45.       Browsed         =   -1  'True
  46.       DataField       =   "OrderID"
  47.       BrowseColWidth  =   6
  48.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  49.          Name            =   "Courier New"
  50.          Size            =   9.75
  51.          Charset         =   0
  52.          Weight          =   400
  53.          Underline       =   0   'False
  54.          Italic          =   0   'False
  55.          Strikethrough   =   0   'False
  56.       EndProperty
  57.    End
  58.    Begin ESDF.ColumnNoEdit ColumnNoEdit2 
  59.       Height          =   315
  60.       Index           =   0
  61.       Left            =   3840
  62.       TabIndex        =   2
  63.       Top             =   1140
  64.       Width           =   1815
  65.       _ExtentX        =   3201
  66.       _ExtentY        =   556
  67.       DataTable       =   "Table1"
  68.       Browsed         =   -1  'True
  69.       DataField       =   "Country"
  70.       BrowseColWidth  =   15
  71.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  72.          Name            =   "Courier New"
  73.          Size            =   9.75
  74.          Charset         =   0
  75.          Weight          =   400
  76.          Underline       =   0   'False
  77.          Italic          =   0   'False
  78.          Strikethrough   =   0   'False
  79.       EndProperty
  80.    End
  81.    Begin ESDF.Table Table3 
  82.       Height          =   1710
  83.       Left            =   180
  84.       TabIndex        =   5
  85.       Top             =   4440
  86.       Width           =   7335
  87.       _ExtentX        =   12938
  88.       _ExtentY        =   3016
  89.       ColorActive     =   16744576
  90.       DatabaseName    =   "C:\Program Files\DevStudio\VB\Nwind.mdb"
  91.       RecordSource    =   "Order Details Extended"
  92.       EnableAdd       =   0   'False
  93.       EnableEdit      =   0   'False
  94.       EnableDel       =   0   'False
  95.       EnableRecall    =   0   'False
  96.       EnableErase     =   0   'False
  97.       ControlBar      =   "ControlBar1"
  98.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  99.          Name            =   "Courier New"
  100.          Size            =   9.75
  101.          Charset         =   0
  102.          Weight          =   400
  103.          Underline       =   0   'False
  104.          Italic          =   0   'False
  105.          Strikethrough   =   0   'False
  106.       EndProperty
  107.    End
  108.    Begin ESDF.Table Table2 
  109.       Height          =   1710
  110.       Left            =   180
  111.       TabIndex        =   6
  112.       Top             =   1860
  113.       Width           =   6015
  114.       _ExtentX        =   10610
  115.       _ExtentY        =   3016
  116.       ColorActive     =   16744576
  117.       DatabaseName    =   "C:\Program Files\DevStudio\VB\Nwind.mdb"
  118.       RecordSource    =   "Orders"
  119.       EnableAdd       =   0   'False
  120.       EnableEdit      =   0   'False
  121.       EnableDel       =   0   'False
  122.       EnableRecall    =   0   'False
  123.       EnableErase     =   0   'False
  124.       ControlBar      =   "ControlBar1"
  125.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  126.          Name            =   "Courier New"
  127.          Size            =   9.75
  128.          Charset         =   0
  129.          Weight          =   400
  130.          Underline       =   0   'False
  131.          Italic          =   0   'False
  132.          Strikethrough   =   0   'False
  133.       EndProperty
  134.    End
  135.    Begin ESDF.Table Table1 
  136.       Height          =   750
  137.       Left            =   180
  138.       TabIndex        =   4
  139.       Top             =   360
  140.       Width           =   6015
  141.       _ExtentX        =   10610
  142.       _ExtentY        =   1323
  143.       ColorActive     =   16744576
  144.       DatabaseName    =   "C:\Program Files\DevStudio\VB\Nwind.mdb"
  145.       RecordSource    =   "Customers"
  146.       EnableAdd       =   0   'False
  147.       EnableEdit      =   0   'False
  148.       EnableDel       =   0   'False
  149.       EnableRecall    =   0   'False
  150.       EnableErase     =   0   'False
  151.       ControlBar      =   "ControlBar1"
  152.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  153.          Name            =   "Courier New"
  154.          Size            =   9.75
  155.          Charset         =   0
  156.          Weight          =   400
  157.          Underline       =   0   'False
  158.          Italic          =   0   'False
  159.          Strikethrough   =   0   'False
  160.       EndProperty
  161.    End
  162.    Begin ESDF.ControlBar ControlBar1 
  163.       Height          =   3975
  164.       Left            =   6540
  165.       TabIndex        =   0
  166.       Top             =   300
  167.       Width           =   1200
  168.       _ExtentX        =   2117
  169.       _ExtentY        =   7011
  170.    End
  171.    Begin ESDF.ColumnNoEdit cneDate 
  172.       Height          =   315
  173.       Index           =   1
  174.       Left            =   2820
  175.       TabIndex        =   9
  176.       Top             =   3660
  177.       Width           =   1455
  178.       _ExtentX        =   2566
  179.       _ExtentY        =   556
  180.       DataTable       =   "Table2"
  181.       Browsed         =   -1  'True
  182.       DataField       =   "RequiredDate"
  183.       BrowseColWidth  =   12
  184.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  185.          Name            =   "Courier New"
  186.          Size            =   9.75
  187.          Charset         =   0
  188.          Weight          =   400
  189.          Underline       =   0   'False
  190.          Italic          =   0   'False
  191.          Strikethrough   =   0   'False
  192.       EndProperty
  193.    End
  194.    Begin ESDF.ColumnNoEdit cneDate 
  195.       Height          =   315
  196.       Index           =   2
  197.       Left            =   1320
  198.       TabIndex        =   8
  199.       Top             =   3660
  200.       Width           =   1395
  201.       _ExtentX        =   2461
  202.       _ExtentY        =   556
  203.       DataTable       =   "Table2"
  204.       Browsed         =   -1  'True
  205.       DataField       =   "OrderDate"
  206.       BrowseColWidth  =   12
  207.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  208.          Name            =   "Courier New"
  209.          Size            =   9.75
  210.          Charset         =   0
  211.          Weight          =   400
  212.          Underline       =   0   'False
  213.          Italic          =   0   'False
  214.          Strikethrough   =   0   'False
  215.       EndProperty
  216.    End
  217.    Begin ESDF.ColumnNoEdit cneDate 
  218.       Height          =   315
  219.       Index           =   3
  220.       Left            =   4440
  221.       TabIndex        =   10
  222.       Top             =   3660
  223.       Width           =   1395
  224.       _ExtentX        =   2461
  225.       _ExtentY        =   556
  226.       DataTable       =   "Table2"
  227.       Browsed         =   -1  'True
  228.       DataField       =   "ShippedDate"
  229.       BrowseColWidth  =   12
  230.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  231.          Name            =   "Courier New"
  232.          Size            =   9.75
  233.          Charset         =   0
  234.          Weight          =   400
  235.          Underline       =   0   'False
  236.          Italic          =   0   'False
  237.          Strikethrough   =   0   'False
  238.       EndProperty
  239.    End
  240.    Begin ESDF.ColumnNoEdit cneCustomerID 
  241.       Height          =   315
  242.       Left            =   5760
  243.       TabIndex        =   3
  244.       Top             =   1140
  245.       Visible         =   0   'False
  246.       Width           =   795
  247.       _ExtentX        =   1402
  248.       _ExtentY        =   556
  249.       DataTable       =   "Table1"
  250.       DataField       =   "CustomerID"
  251.       BrowseColWidth  =   15
  252.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  253.          Name            =   "Courier New"
  254.          Size            =   9.75
  255.          Charset         =   0
  256.          Weight          =   400
  257.          Underline       =   0   'False
  258.          Italic          =   0   'False
  259.          Strikethrough   =   0   'False
  260.       EndProperty
  261.    End
  262.    Begin ESDF.ColumnNoEdit ColumnNoEdit2 
  263.       Height          =   315
  264.       Index           =   2
  265.       Left            =   180
  266.       TabIndex        =   1
  267.       Top             =   1140
  268.       Width           =   3555
  269.       _ExtentX        =   6271
  270.       _ExtentY        =   556
  271.       DataTable       =   "Table1"
  272.       Browsed         =   -1  'True
  273.       DataField       =   "CompanyName"
  274.       BrowseColWidth  =   30
  275.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  276.          Name            =   "Courier New"
  277.          Size            =   9.75
  278.          Charset         =   0
  279.          Weight          =   400
  280.          Underline       =   0   'False
  281.          Italic          =   0   'False
  282.          Strikethrough   =   0   'False
  283.       EndProperty
  284.    End
  285.    Begin ESDF.ColumnNoEdit cneCurrency 
  286.       Height          =   315
  287.       Index           =   1
  288.       Left            =   2400
  289.       TabIndex        =   12
  290.       Top             =   6240
  291.       Width           =   1035
  292.       _ExtentX        =   1826
  293.       _ExtentY        =   556
  294.       DataTable       =   "Table3"
  295.       Browsed         =   -1  'True
  296.       DataField       =   "UnitPrice"
  297.       BrowseColWidth  =   12
  298.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  299.          Name            =   "Courier New"
  300.          Size            =   9.75
  301.          Charset         =   0
  302.          Weight          =   400
  303.          Underline       =   0   'False
  304.          Italic          =   0   'False
  305.          Strikethrough   =   0   'False
  306.       EndProperty
  307.    End
  308.    Begin ESDF.ColumnNoEdit ColumnNoEdit1 
  309.       Height          =   315
  310.       Index           =   2
  311.       Left            =   3480
  312.       TabIndex        =   13
  313.       Top             =   6240
  314.       Width           =   1095
  315.       _ExtentX        =   1931
  316.       _ExtentY        =   556
  317.       DataTable       =   "Table3"
  318.       Browsed         =   -1  'True
  319.       DataField       =   "Quantity"
  320.       BrowseColWidth  =   3
  321.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  322.          Name            =   "Courier New"
  323.          Size            =   9.75
  324.          Charset         =   0
  325.          Weight          =   400
  326.          Underline       =   0   'False
  327.          Italic          =   0   'False
  328.          Strikethrough   =   0   'False
  329.       EndProperty
  330.    End
  331.    Begin ESDF.ColumnNoEdit cnePercent 
  332.       Height          =   315
  333.       Left            =   4620
  334.       TabIndex        =   14
  335.       Top             =   6240
  336.       Width           =   1215
  337.       _ExtentX        =   2143
  338.       _ExtentY        =   556
  339.       DataTable       =   "Table3"
  340.       Browsed         =   -1  'True
  341.       DataField       =   "Discount"
  342.       BrowseColWidth  =   6
  343.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  344.          Name            =   "Courier New"
  345.          Size            =   9.75
  346.          Charset         =   0
  347.          Weight          =   400
  348.          Underline       =   0   'False
  349.          Italic          =   0   'False
  350.          Strikethrough   =   0   'False
  351.       EndProperty
  352.    End
  353.    Begin ESDF.ColumnNoEdit cneCurrency 
  354.       Height          =   315
  355.       Index           =   4
  356.       Left            =   5940
  357.       TabIndex        =   15
  358.       Top             =   6240
  359.       Width           =   1215
  360.       _ExtentX        =   2143
  361.       _ExtentY        =   556
  362.       DataTable       =   "Table3"
  363.       Browsed         =   -1  'True
  364.       DataField       =   "ExtendedPrice"
  365.       BrowseColWidth  =   16
  366.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  367.          Name            =   "Courier New"
  368.          Size            =   9.75
  369.          Charset         =   0
  370.          Weight          =   400
  371.          Underline       =   0   'False
  372.          Italic          =   0   'False
  373.          Strikethrough   =   0   'False
  374.       EndProperty
  375.    End
  376.    Begin VB.Label Label1 
  377.       AutoSize        =   -1  'True
  378.       Caption         =   "... to see details"
  379.       BeginProperty Font 
  380.          Name            =   "Arial"
  381.          Size            =   8.25
  382.          Charset         =   0
  383.          Weight          =   400
  384.          Underline       =   0   'False
  385.          Italic          =   0   'False
  386.          Strikethrough   =   0   'False
  387.       EndProperty
  388.       Height          =   210
  389.       Index           =   2
  390.       Left            =   180
  391.       TabIndex        =   19
  392.       Top             =   4200
  393.       Width           =   1140
  394.    End
  395.    Begin VB.Label Label1 
  396.       AutoSize        =   -1  'True
  397.       Caption         =   "Click order ..."
  398.       BeginProperty Font 
  399.          Name            =   "Arial"
  400.          Size            =   8.25
  401.          Charset         =   0
  402.          Weight          =   400
  403.          Underline       =   0   'False
  404.          Italic          =   0   'False
  405.          Strikethrough   =   0   'False
  406.       EndProperty
  407.       Height          =   210
  408.       Index           =   1
  409.       Left            =   180
  410.       TabIndex        =   18
  411.       Top             =   1620
  412.       Width           =   945
  413.    End
  414.    Begin VB.Label Label1 
  415.       AutoSize        =   -1  'True
  416.       Caption         =   "Country"
  417.       BeginProperty Font 
  418.          Name            =   "Arial"
  419.          Size            =   8.25
  420.          Charset         =   0
  421.          Weight          =   700
  422.          Underline       =   0   'False
  423.          Italic          =   0   'False
  424.          Strikethrough   =   0   'False
  425.       EndProperty
  426.       Height          =   210
  427.       Index           =   0
  428.       Left            =   3900
  429.       TabIndex        =   17
  430.       Top             =   120
  431.       Width           =   660
  432.    End
  433.    Begin VB.Label Label1 
  434.       AutoSize        =   -1  'True
  435.       Caption         =   "Company Name"
  436.       BeginProperty Font 
  437.          Name            =   "Arial"
  438.          Size            =   8.25
  439.          Charset         =   0
  440.          Weight          =   700
  441.          Underline       =   0   'False
  442.          Italic          =   0   'False
  443.          Strikethrough   =   0   'False
  444.       EndProperty
  445.       Height          =   210
  446.       Index           =   4
  447.       Left            =   180
  448.       TabIndex        =   16
  449.       Top             =   180
  450.       Width           =   1290
  451.    End
  452. Attribute VB_Name = "frmCustomerOrders"
  453. Attribute VB_GlobalNameSpace = False
  454. Attribute VB_Creatable = False
  455. Attribute VB_PredeclaredId = True
  456. Attribute VB_Exposed = False
  457. Option Explicit
  458. Dim mstrOrdersTable$
  459. Dim mstrOrderDetailsTable$
  460. Private Sub cneCurrency_BrowseStr(Index As Integer, pstr As String)
  461.     pstr = Format(pstr, "Currency")
  462. End Sub
  463. Private Sub cneDate_BrowseStr(Index As Integer, pstr As String)
  464.     pstr = Format(pstr, "Medium Date")
  465. End Sub
  466. Private Sub cnePercent_BrowseStr(pstr As String)
  467.     pstr = Format(pstr, "Percent")
  468. End Sub
  469. Private Sub Form_Load()
  470.     mstrOrdersTable = Table2.RecordSource
  471.     mstrOrderDetailsTable = Table3.RecordSource
  472. End Sub
  473. Private Sub Table1_TableReposition()
  474.     If Table1.Recordset.RecordCount = 0 Then Exit Sub
  475.     Table2.RecordSource = "SELECT * FROM [" + mstrOrdersTable + "] WHERE CustomerID = '" + cneCustomerID.DataValue + "'"
  476.     Table2.Refresh
  477. End Sub
  478. Private Sub Table2_TableReposition()
  479.     If Table2.Recordset.RecordCount = 0 Then Exit Sub
  480.     Table3.RecordSource = "SELECT * FROM [" + mstrOrderDetailsTable + "] WHERE OrderID = " + cneOrderID.DataValue
  481.     Table3.Refresh
  482. End Sub
  483.